import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)


public class Food0 extends Food
{
    
    
    public void act()
    {
        setFood();
    }
    
    public void setFood()
    {
        if(isTouching(Snake.class)){  //若是碰到贪食蛇，则随机移动到新的位置                   
            randomChose();
        }
    }
    
}
